package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.SettleAccountsEntity;
import com.xbongbong.saas.domain.entity.StockFlowBillEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 流水记录表
 * @author ruansicheng
 * @date 2021/11/22 10:51
 * @since v1.0
 * @version v1.0
 */
@Repository
@Mapper
public interface SettleAccountsDao {
    /**
     * 插入数据
     *
     * @param settleAccountsEntity 表单实体数据
     * @author ruansicheng
     * @date 2021/11/23 16:51
     * @since v1.0
     * @version v1.0
     **/
    Integer insert(SettleAccountsEntity settleAccountsEntity);
    /**
     * 更新数据
     *
     * @param settleAccountsEntity 表单实体数据
     * @author ruansicheng
     * @date 2021/11/23 16:51
     * @since v1.0
     * @version v1.0
     **/
    Integer update(SettleAccountsEntity settleAccountsEntity);

    /**
     * 根据查询数据
     *
     * @param param 查询参数
     * @author ruansicheng
     * @date 2021/11/23 11:00
     * @since v1.0
     * @version v1.0
     **/
    List<SettleAccountsEntity> findEntitys(@Param("param") Map<String, Object> param);
    /**
     * 获取数据条数
     *
     * @param param 查询参数
     * @author ruansicheng
     * @date 2021/11/23 12:00
     * @since v1.0
     * @version v1.0
     **/
    Integer getEntitysCount(@Param("param") Map<String, Object> param);
    /**
     * 获取最新上次结账记录
     *
     * @param corpid 查询参数
     * @author ruansicheng
     * @date 2021/11/23 12:00
     * @since v1.0
     * @version v1.0
     **/
    SettleAccountsEntity getLastSettleAccounts(@Param(value = "corpid") String corpid);
    /**
     * 清除所有结账数据
     *
     * @return SettleAccountsEntity
     * @param corpid 查询参数
     * @author ruansicheng
     * @date 2022/4/6 16:07
     * @descption
     */
    void cleanSettleAccounts(@Param(value = "corpid") String corpid);
}
